-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix check scope 6588 #6596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix check scope 6588 #6596
Conversation
- Fixed workflow permissions so github-script can post PR comments (403 error) - Set temperature to 0 and limited max-tokens to 10 for deterministic yes/no outputs - Updated the prompt with clear related/unrelated definitions and strict yes/no requirements
- Fixed workflow permissions so github-script can post PR comments (403 error) - Set temperature to 0 and limited max-tokens to 10 for deterministic yes/no outputs - Updated the prompt with clear related/unrelated definitions and strict yes/no requirements
|
Thanks @JairoTM-es. Could you please check the latest documentation for the valid list of inputs, getting this warning: |
|
@RitikaPahwa4444 Thanks for the heads-up! I checked the latest actions/ai-inference@v1 documentation and removed the unsupported temperature input. |
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need write access for issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review. The issues: write permission is needed because the workflow posts a comment on the pull request when it detects unrelated changes. Without this permission, the comment step fails with a 403 error and the bot cannot provide guidance to the contributor.
If you prefer to keep permissions more restricted, I can remove the auto-comment step and leave the workflow as a check-only validation.
|
Thanks @JairoTM-es! Would you mind pushing some irrelevant commit to a different file? The workflow should hopefully be able to catch and flag it. We can revert after the testing. |
|
✅ Generated APK variants! |
|
It couldn't detect the unrelated changes, we might have to experiment a bit with the models too. @JairoTM-es would you like to do that? I can change it for the repo as and when you change it here and we can see if it improves. Or I can raise a PR with these changes but change the models, share the findings and then you can update here and we can merge this PR. Let us know what works better for you. |
|
@RitikaPahwa4444 I tested this and the main limitation seems to be the input rather than the model. Since we only pass the PR title and description, unrelated file changes can’t be detected unless they’re mentioned explicitly. I think it’s best to keep this PR focused and handle model or prompt expansion (e.g. passing changed files or diff summaries) in a follow-up. I’m happy to open an issue for that, or we can iterate in a separate PR if you prefer. |
|
@JairoTM-es feel free to raise a follow-up PR and we can test there and merge in reverse order. Sorry, I should have probably kept the scope a bit more open-ended. I'm not sure if these changes improve the status quo and would like to test before merging. |

Description (required)
Fixes #6588
What changes did you make and why?
This PR improves the reliability of the Check Pull Request Scope GitHub Actions workflow.
Fixed 403 error when posting out-of-scope comments
HttpError: Resource not accessible by integration (403)when thegithub-scriptstep attempted to create a comment on a pull request.GITHUB_TOKENdid not have sufficient permissions.Made the AI-based scope detection more deterministic and consistent
temperature: 0max-tokens: 10"yes"or"no"in lowercase, with no extra textTests performed (required)
This PR modifies only a GitHub Actions workflow and does not affect the Android application code or UI.
Screenshots (for UI changes only)
Not applicable — this PR does not introduce UI changes.
Note: I have reviewed
CONTRIBUTING.mdas recommended for first-time contributors.Also updated README formatting and other minor fixes unrelated to the main change.